Function Reference

_ProcessGetName

Returns a string containing the process name that belongs to a given PID.

#include <Process.au3>
_ProcessGetName ( $iPID )

 

Parameters

$iPID The PID of a currently running process.

 

Return Value

Success: Returns The name of the process.
Failure: Returns Blank string and sets the @error to the following values:
@error = 1 : Process doesn't exist
@error = 2 : Error getting process list
@error = 3 : No processes found

 

Remarks

Supplementary to ProcessExists().

 

Related

ProcessExists

 

Example


#include <Process.au3>

Run("notepad.exe")
WinWaitActive("Untitled - Notepad", "")
$pid = WinGetProcess("Untitled - Notepad", "")
$name = _ProcessGetName($pid)

MsgBox(0, "Notepad - " & $pid, $name)